// 字符空心圆图形
#include <stdio.h>
#include <math.h>

void circle()
{
    double y;
    int x, m;
    for (y = 10; y >= -10; y--)
    {
        m = 2.5 * sqrt(100 - y * y);
        for (x = 1; x < 30 - m; x++)
            printf(" ");
        printf("*");
        for (; x < 30 + m; x++)
            printf(" ");
        printf("*\n");
    }
}

//输出余弦
void cosine()
{
    double y;
    int x, m;
    for (y = 1; y >= -1; y -= 0.1)
    {
        m = acos(y) * 10;
        for (x = 1; x < m; x++)
            printf(" ");
        printf("*");
        for (; x < 62 - m; x++)
            printf(" ");
        printf("*\n");
    }
}
